package com.tarim.streetdance.mapper;

import com.tarim.streetdance.model.VideoViews;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component;

import java.util.List;

@Mapper
@Component("VideoViewsMapper")
public interface VideoViewsMapper {
    int deleteByPrimaryKey(Long id);

    int insert(VideoViews record);

    //新增观看记录
    int insertSelective(VideoViews record);

    VideoViews selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(VideoViews record);

    int updateByPrimaryKey(VideoViews record);

    //删除观看记录
    int updateForDelete(VideoViews record);

    //查询用户观看记录
    List<VideoViews> selectByUserId(VideoViews record);
    Long selectByUserIdCount(VideoViews record);

    //查询视频观看数量
    Long selectCountByVideoId(VideoViews record);

    int updateDeleteByUserIdAndVideoId(VideoViews record);
}